package com.project.class8_24.proxy.model.service.impl;

import com.project.class8_24.proxy.model.dao.IUserDao;
import com.project.class8_24.proxy.model.service.IUserService;

import java.lang.reflect.Field;

public class MyTest {
    private IUserDao userDao;
    public static void main(String[] args) {
//        try {
//            Field f = MyTest.class.getDeclaredField("userDao");
//            System.out.println(f.getName()+"    "+f.getType().getSimpleName());
//        } catch (Exception e) {
//            e.printStackTrace();
//        }
        ServiceProxyFactory factory = new ServiceProxyFactory(new UserServiceImpl());
        IUserService service = ( IUserService) factory.getProxy();
        service.press();
    }
}
